import request from '@/utils/http'

export const basicAPI = (filepath) => {
  return request({
    url: '/analyze',
    method: 'GET',
    params: {
      filepath: filepath
    }
  })
}

export const certificateAPI = (filepath) => {
  return request({
    url: '/certificate',
    method: 'GET',
    params: {
      filepath: filepath
    }
  })
}

export const dynamAPI = (dex_dir, filepath, page) => {
  return request({
    url: '/api',
    method: 'GET',
    params: {
      dex_dir: dex_dir,
      filepath: filepath,
      page: page
    }
  })
}

export const staticAPI = (filepath) => {
  return request({
    url: '/permission',
    method: 'GET',
    params: {
      filepath: filepath
    }
  })
}


export const extractAPI = (filepath) => {
  return request({
    url: '/extract',
    method: 'GET',
    params: {
      filepath: filepath
    },
  })
}

export const loadJavaFilesAPI = (path) => {
  return request({
    url: `/list/${path}`,
    method: 'GET',
  })
}

export const structureAPI = (filepath) => {
  return request({
    url: '/structure',
    method: 'GET',
    params: {
      filepath: filepath
    },
  })
}

export const viewFileAPI = (filepath) => {
  return request({
    url: `/view/${filepath}`,
    method: 'GET',
  })
}

export const dynamicAPI = (filepath) => {
return request({
    url: '/dynamic',
    method: 'GET',
    params: {
      filepath: filepath
    },
  })
}

export const dynamicAPI1 = (filepath) => {
return request({
    url: '/dynamic_1',
    method: 'GET',
    params: {
      filepath: filepath
    },
  })
}

export const apkLinkAPI = (filepath) => {
return request({
    url: '/download_apk',
    method: 'GET',
    params: {
      filepath: filepath
    },
  })
}

export const qrcodeAPI=(filepath)=>{
  return request({
    url: '/download_qrcode',
    method: 'GET',
    params: {
      url: filepath
    },
  })
}

export const buttonAPI=(filepath)=>{
  return request({
    url: '/download_button',
    method: 'GET',
    params: {
      link: filepath
    },
  })
}

export const filterAPI=(filepath)=>{
  return request({
    url: '/filter',
    method: 'GET',
    params: {
      filepath: filepath
    },
  })
}

export const ModelAPI = (filepath) => {
return request({
    url: '/model',
    method: 'GET',
    params: {
      filepath: filepath
    },
  })
}
